package com.baidu.entity;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Category {

    private Long id;
    private Long pid;
    private String name;
    /**
     * 用于存储子孙节点,不然无法遍历所有节点
     */
    private List<Category> children = new ArrayList<>();
}
